/*
 * Manager.h
 *
 *  Created on: Aug 12, 2016
 *      Author: ubuntu
 */

#ifndef MANAGER_H_
#define MANAGER_H_

#include <iostream>
#include <queue>
#include <list>
#include <vector>

#include "TcpServer.h"
#include "DBManager.h"

using namespace std;

class Manager {
public:
	Manager();
	virtual ~Manager();

	virtual bool init();
	virtual void start();
	virtual void stop();
	static void *ServerThread(void *arg);
	static void *DataManage(void *arg);
	static void *ClearThread(void *arg);

protected:
	virtual void clearClient();

private:
	vector<TcpServer *> m_lstServers;
	DBManager *pManager;

	bool m_bTerminated;
};



#endif /* MANAGER_H_ */
